﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;


class MaxAndMin
{
    static void Main()
    {
        Console.WriteLine("Min Max");
        Console.Write("Enter number and press enter: ");
        string sNumber = Console.ReadLine();
        int number = Convert.ToInt32(sNumber);
        int max = number;
        int min = number;
        do
        {
            if (number > max)
            {
                max = number;
            }
            if (number < min)
            {
                min = number;
            }
            Console.Write("Enter number (or ; for end) and press enter: ");
            sNumber = Console.ReadLine();
            if (sNumber == ";")
            {
                break;
            }
            number = Convert.ToInt32(sNumber);
        } while (max > 0);
        Console.WriteLine("Min {0} ; Max {1}", min, max);
    }
}

